package com.jvm.interpreter.instruction;

import com.jvm.classfile.model.CpInfo;
import com.jvm.interpreter.Frame;
import com.jvm.interpreter.Instruction;

/**
 * @program: diy_simple_jvm
 * @description: iconst_0指令
 * @author: CaoYong
 * @create: 2021-07-08 13:26
 **/
public class IConst0Inst implements Instruction {

    @Override
    public void eval(Frame frame) {
        frame.pushInt(0);
        frame.pc = offset();
    }

    static IConst0Inst parse(java.io.DataInputStream dis, CpInfo[] cp) throws java.io.IOException {
        return new IConst0Inst();
    }

}
